import request from '@/utils/request'
import BASE_URL from '@/api/base'

export function login(data) {
  return request({
    url: BASE_URL + 'user/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
     url: BASE_URL +'user/info?token=admin-token',
     method: 'get'
   })
}

export function getProfile() {
  return request({
    url: BASE_URL + 'user/info',
    method: 'post'
  })
}

export function logout() {
  return request({
    url: BASE_URL + 'user/logout',
    method: 'post'
  })
}
